package com.chess.chessplay.pojo;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class R {
    private Map<String,Object> data = new HashMap<>();

    public static R ok(){
        R r = new R();
        r.Data("message","ok");
        return r;
    }
    public static R error(){
        R r = new R();
        r.Data("message","error");
        return r;
    }

    public R Data(String key, Object value) {
        data.put(key,value);
        return this;
    }
}
